import service from "./service.js"

const http={
	get(url,param){
		const config={
			url:url,
			params:param?param:undefined,
			method:'get'
		}
		return service(config)
	},
	post(url,param){
		const config={
			url:url,
			data:param?param:undefined,
			method:'post'
		}
		return service(config)
	},
	put(url,param){
		const config={
			url:url,
			params:param?param:undefined,
			method:'put'
		}
		return service(config)
	},
	delete(url,param){
		const config={
			url:url,
			params:param?param:undefined,
			method:'delete'
		}
		return service(config)
	},
}

export default http